<template>
  <div>
    <template v-if="shipment.planType === PLAN_TYPE_FL()">
      <shipment-box-table1 :table-data="tableData"></shipment-box-table1>
    </template>
    <template v-else-if="shipment.planType === PLAN_TYPE_MW()">
      <shipment-box-table2 :get-data="getData" :table-data="tableData"></shipment-box-table2>
    </template>

  </div>
</template>

<script>
import {getBoxStatusStr, getBoxTypeStr, STATUS_CREATED, STATUS_RECEIVED} from "@/utils/boxLabel";
import ReElTable from "@/components/Common/ReElTable.vue";
import {PLAN_TYPE_FL, PLAN_TYPE_MW} from "@/utils/shippingPlan";
import ShipmentBoxTable1 from "@/views/shipment/components/ShipmentBoxTable1.vue";
import ShipmentBoxTable2 from "@/views/shipment/components/ShipmentBoxTable2.vue";

export default {
  name: 'ShipmentBoxTable',
  components: {ShipmentBoxTable2, ShipmentBoxTable1},

  props: {
    tableData: {
      type : Array,
      required: true,
    },
    shipment: {
      type: Object,
      required: true,
    },
    getData:{
      type:Function,
    }
  },
  methods: {
    PLAN_TYPE_MW() {
      return PLAN_TYPE_MW
    },
    PLAN_TYPE_FL() {
      return PLAN_TYPE_FL
    }

  },

}
</script>

<style scoped lang="scss">

</style>
